/*#include<stdio.h>
int main()
#pragma warning(disable:4996)
{
	int age = 0;
	scanf("%d", age);
	int time = 3156;
	time = age * time;
	printf("%d0000", time);
	return 0;


}*/
#include<stdio.h>
int main()
#pragma warning(disable:4996)
{
	int h;
	int	m;
	int	s;
	scanf("%d", &s);
	h = s / 60 / 60;
	m = s / 60;
	s = s % 60;
	printf("%d %d %d", h, m, s);

	return 0;
}
